import Vue from 'vue'
import App from './App'
import uView from 'uview-ui';
import store from './store';
Vue.use(uView);
Vue.config.productionTip = false

/**
 * 指令
 */
import * as directives from './utils/directives'
Object.keys(directives).forEach(k => { 
  console.log('directives',k);
  Vue.directive(k, directives[k]); 
})

//过滤器
import * as filter from './utils/filters' 
Object.keys(filter).forEach(k => {
  console.log("filter:",k ,"$"+k)
  Vue.filter(k, filter[k]);
  Vue.prototype["$"+k] = filter[k] 
})

App.mpType = 'app'

export const vueInstance = new Vue({
  ...App,
  store,
})
vueInstance.$mount()
